package com.smedi.ismedi.organization.core.domain.repository;

import com.smedi.ismedi.organization.core.domain.aggregatemodel.HrOrganization;
import com.smedi.ismedi.organization.core.domain.aggregatemodel.dto.OrganizationQuery;
import com.smedi.ismedi.organization.core.domain.aggregatemodel.model.DingOrg;
import com.smedi.ismedi.organization.core.domain.aggregatemodel.model.Organization;

import java.util.List;

public interface HrOrganizationRepository {
    HrOrganization selectByHrOrganizationId(Long hrOrganizationId);

    List<HrOrganization> selectByHrOrganizationIds(List<Long> hrOrganizationIds);

    List<HrOrganization> queryAll();

    List<HrOrganization> queryAllSkipSql();

    HrOrganization doInsert(HrOrganization data);

    HrOrganization doUpdate(HrOrganization data);

    void doDelete(HrOrganization data);

    HrOrganization selectHrOrganizationRoot();

    List<HrOrganization> selectByParentId(Long hrOrganizationId);

    List<HrOrganization> selectAllRoots();

    int selectFullNameCount(String fullName, Long hrOrganizationId);

    int selectShortNameCount(String shortName, Long hrOrganizationId);

    int selectOrganizationCodeCount(String organizationCode, Long hrOrganizationId);

    List<HrOrganization> selectByFullNameLike(String fullName);

    List<HrOrganization> selectByFullNameList(List<String> fullNameList);

    List<HrOrganization> selectHrOrganizationByTypeList(List<String> typeList);
    
    List<HrOrganization> selectHrOrganizationByTypeListNew(List<String> typeList,List<HrOrganization> hrOrganizationList);

    List<HrOrganization> selectAll();

    List<HrOrganization> getAllHrOrganization();

    Organization getOrganizationOne(OrganizationQuery organizationQuery);

    List<Organization> getOrganizationList(OrganizationQuery organizationQuery);

    List<Organization> getOrganizationListWithoutToken(OrganizationQuery organizationQuery);

    long updateHrOrgByShortName(String shortName, String dingDeptKey);

    List<DingOrg> getAllDingOrgList(List<Long> ids);
}
